        <script>
            $(document).ready(function(){
              $('.passgenlnk').pGenerator({
                  'bind': 'click',
                  'passwordElement': '#WebhostingApassword',
                  'displayElement': '#WebhostingApassword',
                  'passwordLength': 8,
                  'uppercase': true,
                  'lowercase': true,
                  'numbers':   true,
                  'specialChars': false,
                  /*'onPasswordGenerated': function(generatedPassword) {
                  	alert('My new generated password is ' + generatedPassword);
                  }  */
              });
          });
        </script>
        <?php
      echo"
        <script type=\"text/javascript\">
            $(document).ready(function() {
                $(\"#WebhostingTarif\").change(function() {
                    var tarif=$(\"#WebhostingTarif option:selected\").val();
                    var cost=0;
                    if(tarif=='Extra1')
                        cost=2;
                    if(tarif=='Extra2')
                        cost=6;
                    if(tarif=='Extra3')
                        cost=12;
                    $(\"#WebhostingCost\").val(cost);
                });
            });
        </script>
        <h2>Заказ web-хостинга</h2>";
        echo $this->Form->create('Webhosting',array('url' => array('controller' => 'Webhosting', 'action' => 'add')));
        $options=array('Extra 1', 'Extra 2', 'Extra 3');
        $values=array('Extra1', 'Extra2', 'Extra3');
        echo $this->Form->input('tarif', array(
                'options' => array_combine($values,$options),
                'label' => 'Выберите тарифный план',
                'selected' => 'Extra1'
            ));
        echo "<a href='http://extra.radioheart.ru' target='_blank'>Посмотреть параметры тарифных планов</a>";
        echo $this->Form->input('apassword', array('label' => 'Введите пароль для ПУ web-хостингом','required' => 1));
        echo $this->Html->link('Сгенерировать', '#', array('class' => 'passgenlnk'));
        echo $this->Form->input('cost', array(
            'label' => 'Цена тарифа',
            'value' => 2,
            'required' => 1,
            'readonly' => 1
            ));
        echo $this->Form->end(__('Save'));
?>